function getPageInitData(type){
	var iconStr = ''
	var methodStr = ''
	var detailM = ''
	var titleStr = type;
	var pageArr = []
	switch (type){
		case '发表论文备案':
			iconStr='ic_work_ky_01'
			methodStr="web.INMSMComm:FindThesisList"
			detailM = 'web.INMSMComm:GetThesis'
			pageArr = [{'title':'论文题目','key':'ThesisTitle'},{'title':'作者','key':'tableDataDesc','type':'auth'},
				{'title':'发表期刊名称','key':'ThesisName'},{'title':'是否本专科','key':'ThesisSpecDesc'},
				{'title':'期刊类型','key':'ThesisLevelDesc'},{'title':'论文类型','key':'ThesisTypeDesc'},
				{'title':'年,卷(期):页码','key':'ThesisPage'},{'title':'发表日期','key':'ThesisPublic'},
				{'title':'附件','key':'ThesisFile','type':'file'}]
			break;
		case '获奖论文备案':
			iconStr='ic_work_ky_02'
			methodStr="web.INMSMComm:FindAwardThesisList"
			detailM = 'web.INMSMComm:GetAWardThesis'
			titleStr = '交流'+type
			pageArr = [{'title':'第一作者','key':'AwardAuthorName'},{'title':'论文题目','key':'AwardTitle'},
				{'title':'会议名称','key':'AwardName'},{'title':'会议级别','key':'AwardLevelDesc'},
				{'title':'获得奖项','key':'AwardSituationDesc'},{'title':'交流日期','key':'AwardDate'},
				{'title':'是否本专科','key':'AwardSpecDesc'},{'title':'参与者','key':'AwardPartName'},
				{'title':'附件','key':'AwardFile','type':'file'}]
			break;
		case '上交论文备案':
			iconStr='ic_work_ky_03'
			methodStr = 'web.INMSMComm:FindEndYearThesisList'
			detailM = 'web.INMSMComm:GetEndYearThseis'
			pageArr = [{'title':'所属病区','key':'EytWardDesc'},{'title':'层级','key':'EytLevelDesc'},
				{'title':'职称','key':'EytHireDesc'},{'title':'论文题目','key':'EytTitle'},
				{'title':'论文类型','key':'EytTypeDesc'},{'title':'附件','key':'EytFile','type':'file'}]
			break;
		case '科研立项备案':
			iconStr='ic_work_ky_04'
			methodStr = 'web.INMSMComm:FindRegSciList'
			detailM = 'web.INMSMComm:GetRegSci'
			pageArr = [{'title':'申请日期','key':'RegSciAppDate'},{'title':'立项日期','key':'RegSciItemDate'},
				{'title':'科研类型','key':'RegSciTypeDesc'},{'title':'项目名称','key':'RegSciName'},
				{'title':'负责人','key':'RegSciLeadName'},{'title':'参与人','key':'RegSciPartName'},
				{'title':'完成情况','key':'RegSciSituation'}]
			break;
		case '科室创新备案':
			iconStr='ic_work_ky_05'
			methodStr = 'web.INMSMComm:FindLocInnList'
			detailM = 'web.INMSMComm:GetLocInn'
			pageArr = [{'title':'创新主题','key':'LocInnTheme'},{'title':'创新类型','key':'LocInnTypeDesc'},
				{'title':'负责人','key':'LocInnLeadName'},{'title':'创新病区','key':'LocInnWardDesc'},
				{'title':'是否本专科','key':'LocInnSpecDesc'},{'title':'参与者','key':'LocInnPartName'}]
			break;
		case '获奖创新备案':
			iconStr='ic_work_ky_06'
			methodStr = 'web.INMSMComm:FindAwaInnList'
			detailM = 'web.INMSMComm:GetAwaInn'
			pageArr = [{'title':'获奖创新主题','key':'AwaInnTheme'},{'title':'创新类型','key':'AwaInnTypeDesc'},
				{'title':'获得奖项','key':'AwaInnAwardDesc'},{'title':'奖项级别','key':'AwaInnLevelDesc'},
				{'title':'负责人','key':'AwaInnLeadName'},{'title':'获奖病区','key':'AwaInnWardDesc'},
				{'title':'是否本专科','key':'AwaInnSpecDesc'},{'title':'参与者','key':'AwaInnPartName'},
				{'title':'附件','key':'AwaPic','type':'file'}]
			break;
		case '专利备案':
			iconStr='ic_work_ky_07'
			methodStr = 'web.INMSMComm:FindPatentList'
			detailM = 'web.INMSMComm:GetPatent'
			pageArr = [{'title':'专利名称','key':'PatentName'},{'title':'专利类型','key':'PatentTypeDesc'},
				{'title':'专利号','key':'PatentNumber'},{'title':'认证机构','key':'PatentMechanism'},
				{'title':'病区','key':'PatentWardDesc'},{'title':'申请日期','key':'PatentDate'},
				{'title':'发明人','key':'PatentPerName'},{'title':'附件','key':'PatentPic','type':'file'}]
			break;
		default:
			break;
	}
	return {'icon':iconStr,'titleStr':titleStr,'method':methodStr,'detailM':detailM,'pageArr':pageArr}
}

function getKyStatusKey(type){
	var statusKey=''
	switch (type){
		case '发表论文备案':
			statusKey = 'ThesisStatus'
			break;
		case '获奖论文备案':
			statusKey = 'AwardStatusDesc'
			break;
		case '上交论文备案':
			statusKey = 'EytStatusDesc'
			break;
		case '科研立项备案':
			statusKey = 'RegSciStatusDesc'
			break;
		case '科室创新备案':
			statusKey = 'LocInnStatusDesc'
			break;
		case '获奖创新备案':
			statusKey = 'AwaInnStatusDesc'
			break;
		case '专利备案':
			statusKey = 'PatentStatusDesc'
			break;
		default:
			break;
	}
	return statusKey
}

//"S「臧阳爽「29「0,F「小花花「1「1,T「露露「2「2"
function getAuthorHtml(valueStr){
	var authArr = valueStr.split(',')
	var authDict = {'第一作者':'','第二作者':'','第三作者':''}
	for (var i = 0; i < authArr.length;i++) {
		var oneStr = authArr[i]
		var oneArr = oneStr.split('「')
		authDict[oneArr[0]] += '<div class="mui-ellipsis">'+oneArr[1]+' '+oneArr[0]+' '+oneArr[2]+'</div>'
	}
	return authDict['第一作者']+authDict['第二作者']+authDict['第三作者'];
}

function getFileHtml(valueStr){
	var fileArr = valueStr.split('」')
	var html = ''
	for (var j = 0; j < fileArr.length;j++) {
		var oneUrl = fileArr[j]
		var index = oneUrl.lastIndexOf("\/");  
		var fileName=oneUrl.substring(index+1,oneUrl.length);
		if (j > 0) {
			html +=','
		}
		html +=fileName;
	}
	return html
}
function fileTypeIcon(url){
	var icon = ''
	url = url.toLowerCase()
	if (url.endsWith(".pdf")) {
		icon = 'pdf'
	}else if (url.endsWith(".png")||url.endsWith(".jpg")||url.endsWith(".jpeg")||url.endsWith(".gif")||url.endsWith(".bmp")) {
		icon = 'img'
	}else if (url.endsWith(".doc") || url.endsWith(".docx")) {
		icon = 'word'
	}else if (url.endsWith(".ppt") || url.endsWith(".pptx")) {
		icon = 'ppt'
	}else if (url.endsWith(".txt") || url.endsWith(".json")) {
		icon = 'txt'
	}else{
		icon = 'file'
	}
	return icon
}
//详情页面方法
function getDetailPageData(type){
	var detailM = ''
	switch (type){
		case '发表论文备案':
			detailM = 'web.INMSMComm:GetThesis'
			break;
		case '获奖论文备案':
			detailM = 'web.INMSMComm:GetAWardThesis'
			break;
		case '上交论文备案':
			detailM = 'web.INMSMComm:GetEndYearThseis'
			break;
		case '科研立项备案':
			detailM = 'web.INMSMComm:GetRegSci'
			break;
		case '科室创新备案':
			detailM = 'web.INMSMComm:GetLocInn'
			break;
		case '获奖创新备案':
			detailM = 'web.INMSMComm:GetAwaInn'
			break;
		case '专利备案':
			detailM = 'web.INMSMComm:GetPatent'
			break;
		default:
			break;
	}
	return {'method':detailM,'type':'RecMethod'}
}

//新建页面文件名
function getKyNewPageName(type){
	var pagefileName=''
	switch (type){
		case '发表论文备案':
			pagefileName = 'kyNewThesis'
			break;
		case '获奖论文备案':
			pagefileName = 'kyNewAward'
			break;
		case '上交论文备案':
			pagefileName = 'kyNewEyt'
			break;
		case '科研立项备案':
			pagefileName = 'kyNewReg'
			break;
		case '科室创新备案':
			pagefileName = 'kyNewLocInn'
			break;
		case '获奖创新备案':
			pagefileName = 'kyNewAwaInn'
			break;
		case '专利备案':
			pagefileName = 'kyNewPatent'
			break;
		default:
			break;
	}
	return pagefileName
}

//"S「臧阳爽「29「0,F「小花花「1「1,T「露露「2「2"
function getKyNewAuthText(valueStr){
	var authArr = valueStr.split(',')
	var authDict = {'F':'','S':'','T':''}
	for (var i = 0; i < authArr.length;i++) {
		var oneStr = authArr[i]
		var oneArr = oneStr.split('「')
		authDict[oneArr[0]] +=  '<div class="oneAuth">'+oneArr[1]+'</div>'+
			'<div data-id="'+oneArr[2]+'" class="oneAuth">'+oneArr[2]+'</div>'
	}
	for (var id in authDict) {
		if (authDict[id] == '') {
			authDict[id] = '<div class="authSelectTip">添加作者</div>'
		}
	}
	return authDict
}

function dealUndefined(str){
	if (str == undefined || str == null) {
		return ''
	}
	return str
}

function getAbsPosition(item) {
	var actualLeft = item.offsetLeft;
	var actualTop = item.offsetTop;
	var current = item.offsetParent;
	while (current !== null) {
		actualLeft += (current.offsetLeft + current.clientLeft);
		actualTop += (current.offsetTop + current.clientTop);
		current = current.offsetParent;
	}
	return {
		'left': actualLeft,
		'top': actualTop
	};
}
function getKyPath(type){
	var method = ''
	switch (type){
		case '发表论文备案':
			method = 'Thesis'
			break;
		case '获奖论文备案':
			method = 'Award'
			break;
		case '上交论文备案':
			method = 'EndYearThesis'
			break;
		case '科室创新备案':
			method = 'LocInn'
			break;
		case '获奖创新备案':
			method = 'AwaInn'
			break;
		case '专利备案':
			method = 'Patent'
			break;
		case '专科活动备案':
			method = 'SpecialActivity'
			break;
		case '规范参与备案':
			method = 'StandardParticipation'
			break;
		default:
			break;
	}
	return method
}